return;
}
- xml_tag* new_tag = new xml_tag;
+ auto* new_tag = new xml_tag;
new_tag->tagname = el;
int attr_count = attr.size();
new_tag->parent = cur_tag;
}
} else {
- fs_xml* fs_gpx = (fs_xml*)fs_chain_find(*fs_ptr, FS_GPX);
+ auto* fs_gpx = (fs_xml*)fs_chain_find(*fs_ptr, FS_GPX);
if (fs_gpx && fs_gpx->tag) {
cur_tag = fs_gpx->tag;
tag_log_wpt(const QXmlStreamAttributes& attr)
{
/* create a new waypoint */
- Waypoint* lwp_tmp = new Waypoint;
+ auto* lwp_tmp = new Waypoint;
/* extract the lat/lon attributes */
if (attr.hasAttribute("lat")) {
static void
gpx_end(const QString&)
{
- float x;
int passthrough;
static QDateTime gc_log_date;
wpt_tmp->AllocGCData()->type = gs_mktype(cdatastr);
break;
case tt_cache_difficulty:
- x = cdatastr.toDouble();
- wpt_tmp->AllocGCData()->diff = x * 10;
+ wpt_tmp->AllocGCData()->diff = cdatastr.toFloat() * 10;
break;
case tt_cache_hint:
wpt_tmp->AllocGCData()->hint = cdatastr;
}
break;
case tt_cache_terrain:
- x = cdatastr.toDouble();
- wpt_tmp->AllocGCData()->terr = x * 10;
+ wpt_tmp->AllocGCData()->terr = cdatastr.toFloat() * 10;
break;
case tt_cache_placer:
wpt_tmp->AllocGCData()->placer = cdatastr;
wpt_tmp->SetCreationTime(xml_parse_time(cdatastr));
break;
case tt_wpttype_geoidheight:
- WAYPT_SET(wpt_tmp, geoidheight, cdatastr.toDouble());
+ WAYPT_SET(wpt_tmp, geoidheight, cdatastr.toDouble())
break;
case tt_wpttype_cmt:
wpt_tmp->description = cdatastr;
wpt_tmp->notes = cdatastr;
break;
case tt_wpttype_pdop:
- wpt_tmp->pdop = cdatastr.toDouble();
+ wpt_tmp->pdop = cdatastr.toFloat();
break;
case tt_wpttype_hdop:
- wpt_tmp->hdop = cdatastr.toDouble();
+ wpt_tmp->hdop = cdatastr.toFloat();
break;
case tt_wpttype_vdop:
- wpt_tmp->vdop = cdatastr.toDouble();
+ wpt_tmp->vdop = cdatastr.toFloat();
break;
case tt_wpttype_sat:
- wpt_tmp->sat = cdatastr.toDouble();
+ wpt_tmp->sat = cdatastr.toInt();
break;
case tt_wpttype_fix:
if (cdatastr == QLatin1String("none")) {
gpx_write_common_acc(waypointp);
if (!(opt_humminbirdext || opt_garminext)) {
- fs_xml* fs_gpx = (fs_xml*)fs_chain_find(waypointp->fs, FS_GPX);
- garmin_fs_t* gmsd = GMSD_FIND(waypointp); /* gARmIN sPECIAL dATA */
+ auto* fs_gpx = (fs_xml*)fs_chain_find(waypointp->fs, FS_GPX);
+ auto* gmsd = GMSD_FIND(waypointp); /* gARmIN sPECIAL dATA */
if (fs_gpx) {
if (! gmsd) {
fprint_xml_chain(fs_gpx->tag, waypointp);
if (gpx_wversion_num > 10) {
if (!(opt_humminbirdext || opt_garminext)) {
- fs_xml* fs_gpx = (fs_xml*)fs_chain_find(rte->fs, FS_GPX);
+ auto* fs_gpx = (fs_xml*)fs_chain_find(rte->fs, FS_GPX);
if (fs_gpx) {
fprint_xml_chain(fs_gpx->tag, nullptr);
}
gpx_write_common_acc(waypointp);
if (!(opt_humminbirdext || opt_garminext)) {
- fs_xml* fs_gpx = (fs_xml*)fs_chain_find(waypointp->fs, FS_GPX);
+ auto* fs_gpx = (fs_xml*)fs_chain_find(waypointp->fs, FS_GPX);
if (fs_gpx) {
fprint_xml_chain(fs_gpx->tag, waypointp);
}
if (gpx_wversion_num > 10) {
if (!(opt_humminbirdext || opt_garminext)) {
- fs_xml* fs_gpx = (fs_xml*)fs_chain_find(rte->fs, FS_GPX);
+ auto* fs_gpx = (fs_xml*)fs_chain_find(rte->fs, FS_GPX);
if (fs_gpx) {
fprint_xml_chain(fs_gpx->tag, nullptr);
}
gpx_write_common_acc(waypointp);
if (!(opt_humminbirdext || opt_garminext)) {
- fs_xml* fs_gpx = (fs_xml*)fs_chain_find(waypointp->fs, FS_GPX);
+ auto* fs_gpx = (fs_xml*)fs_chain_find(waypointp->fs, FS_GPX);
if (fs_gpx) {
fprint_xml_chain(fs_gpx->tag, waypointp);
}